![]() |
StdText |
||||
Header: | QuickdrawText.h | Carbon status: | Supported | |
Draws text from an arbitrary structure in memory specified by textBuf, starting from the first byte and continuing for count bytes. This is the standard low-level function for drawing text.
void StdText ( SInt16 count, const void *textAddr, Point numer, Point denom );
The number of bytes to be counted.
A pointer to the beginning of the text in memory.
A point giving the numerator for the horizontal and vertical scaling factors.
Both numer and denom are point values: numer specifies the numerator for the horizontal and vertical scaling factors, and denom specifies the denominator for the horizontal and vertical scaling factors. Together, these values specify the scaling factors for the text: numer.v over denom.v gives the vertical scaling (height), and numer.h over denom.h gives the horizontal scaling factors (width). You need to specify values for numer and denom even if you are not scaling the text. For unscaled text, you can specify scaling factors of 1, 1.
A point giving the denominator for the horizontal and vertical scaling factors.
The StdText function is a QuickDraw bottleneck function that the QuickDraw text drawing functions use extensively.
The high-level QuickDraw text functions provide most of the functionality needed to measure and draw text. However, if you need to call StdText directly, you must first check the graphics port grafProcs field to determine whether the bottleneck functions have been customized, and if so, you must call the customized function instead of the standard one. The bottleneck functions are always customized for printing.
If the grafProcs field contains NULL, the standard bottleneck functions have not been customized. If the grafProcs field contains a pointer, the standard bottleneck functions have been replaced by customized ones. This pointer (of type QDProcPtr) points to a QDProc structure, which contains fields that point to the bottleneck function to be used for a specific drawing function. If the standard bottleneck function has been customized, your application needs to use the customized function indicated by the QDProc structure field.
You can call the StdText function directly to draw text that is scaled or unscaled.
The StdText function gives the correct results for all script systems. The count parameter is the number of bytes of the text to be drawn, not characters. When specifying this value, consider that 2-byte script systems also include characters consisting of only one byte.
Supported in Carbon. Available in CarbonLib 1.0 and later when InterfaceLib 7.1 or later is installed. Exported by CarbonLib 1.0 and later and by InterfaceLib 7.1 and later.
© 2000 Apple Computer, Inc. — (Last Updated 4/4/2000)